<?php
include APPPATH . 'views/cms/inc/01_head.php';
include APPPATH . 'views/cms/inc/05_top.php';
?>
<!-- Content container -->
<div id="container">
    <?php include APPPATH . 'views/cms/inc/04_slidebar.php'; ?>
    <!-- Content -->
    <div id="content">
		<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js" ></script>
		<script type="text/javascript" src="/libraries/cms/sm/sm.system.js" ></script>
		<script type="text/javascript">
	        $(document).ready(function() {
				$('.navi-config-<?php echo $type?>').addClass('current');
	        });
	    </script>
        <!-- Content wrapper -->
        <div class="wrapper">

            <!-- Breadcrumbs line -->
            <div class="crumbs">
                <ul id="breadcrumbs" class="breadcrumb"> 
                    <li><a href="/cms">CMS</a></li>
                    <li ><a href="/cms/cp" title="">System Manager</a></li>
                    <li class="active"><a href="#" title="">SYSTEM</a></li>
                </ul>

                <ul class="alt-buttons">
                    <li><a href="#" title=""><i class="icon-signal"></i><span>Stats</span></a></li>
                    <li><a href="#" title=""><i class="icon-comments"></i><span>Messages</span></a></li>
                    <li class="dropdown"><a href="/cms/ho" title="" ><i class="icon-tasks"></i><span>Tasks</span> <strong>(+16)</strong></a>
                        
                    </li>
                </ul>
            </div>
            <!-- /breadcrumbs line -->

            <br/>
			<!--<form 
				id="system_form_panel_0" 
				name="system_form_panel_0" 
				class="system_frm"
				action="" method="POST" onsubmit="return false;"
				target="integration_asynchronous" autocomplete="off">
				<div class="widget" style="margin-bottom: 12px;">
					<div class="navbar" >
						<div class="navbar-inner" style="position:relative">
							<input type="text" 
								name="Name" class="validate[required]"
								data-prompt-position="topLeft:-1,-5"
								style="border:0;position:absolute;top:0;height:100%;width:100%;left:0;z-index:2"
								placeholder="N A M E"
								data-putto=".error_hoten"
								/>
							<ul class="nav pull-right" style="position:relative;z-index:3">
								<li><a href="JavaScript:_SM.onSave('0');"><i class="icon-plus"></i>A D D</a></li>
								<li class="dropdown">
									<a href="components.html#" class="dropdown-toggle" data-toggle="dropdown">Drops <b class="caret"></b></a>
									<ul class="dropdown-menu pull-right">
										<li><a href="JavaScript:addEditorBasic('editor_value_0');"><i class="icon-pencil"></i>ADD EDITOR</a></li>
										<li><a href="JavaScript:removeEditor('editor_value_0');"><i class="icon-remove"></i>REMOVE EDITOR</a></li>
										<li><a href="JavaScript:_SM.onSave('0');"><i class="icon-plus"></i> A D D</a></li>
										<li><a href="JavaScript:BrowseServer('#editor_value_0');"><i class="icon-picture"></i> IMAGE</a></li>
									</ul>
								</li>
							</ul>
						</div>
					</div>
					<div class="error_hoten"></div>
					<div class="row-fluid">
						<textarea rows="2" name="Desc" 
							class="span12 validate[required]" 
							data-prompt-position="topLeft:-1,-5"
							placeholder="D E S C R I P T I O N"></textarea>
						<textarea style="margin-top:1px" rows="5" 
							name="Value" id="editor_value_0"
							class="span12 validate[required]" 
							data-prompt-position="topLeft:-1,-5"
							placeholder="V A L U E"></textarea>
					</div>
				</div>
			</form>
			-->
			<?php
				if($items){
					foreach($items as $item){
			?>
			<form 
				id="system_form_panel_<?php echo $item->Id ?>" 
				name="system_form_panel_<?php echo $item->Id ?>" 
				class="system_frm"
				action="" method="POST" onsubmit="return false;"
				target="integration_asynchronous" autocomplete="off">
				<div class="widget" style="margin-bottom: 12px;">
					<div class="navbar">
						<div class="navbar-inner">
							<h6> <?php echo $item->Name ?></h6>
							<ul class="nav pull-right">
								<li><a href="JavaScript:_SM.onSave('<?php echo $item->Id ?>');"><i class=" icon-save"></i>D O N E</a></li>
								<!--<li class="dropdown">
									<a href="components.html#" class="dropdown-toggle" data-toggle="dropdown">Drops <b class="caret"></b></a>
									<ul class="dropdown-menu pull-right">
										<li><a href="JavaScript:addEditorBasic('editor_value_<?php echo $item->Id ?>');"><i class="icon-pencil"></i>ADD EDITOR</a></li>
										<li><a href="JavaScript:removeEditor('editor_value_<?php echo $item->Id ?>');"><i class="icon-remove"></i>REMOVE EDITOR</a></li>
										<li><a href="JavaScript:_SM.onSave('<?php echo $item->Id ?>');"><i class="icon-save"></i>S A V E</a></li> 
										<li><a href="JavaScript:_SM.onDelete('<?php echo $item->Id ?>');"><i class="icon-trash"></i>D E L E T E</a></li> 
									</ul>
								</li>-->
							</ul>
						</div>
					</div>
					<div class="widget row-fluid">
    					<div class="well form-horizontal">
							<div class="control-group">
		                        <label class="control-label">Desc :</label>
		                        <div class="controls">
		                            <textarea rows="2" 
										name="Desc" 
										class="span12 validate[required]"
										data-prompt-position="topLeft:-1,-5"
										placeholder="D E S C R I P T I O N"
										><?php echo $item->Desc ?></textarea>
		                        </div>
		                    </div>
							<div class="control-group">
		                        <label class="control-label">Content :</label>
		                        <div class="controls">
		                            <textarea style="margin-top:1px" rows="5" 
										name="Value" id="editor_value_<?php echo $item->Id ?>"
										class="span12 validate[required]"
										data-prompt-position="topLeft:-1,-5"
										placeholder="V A L U E"
										><?php echo $item->Value ?></textarea>
		                        </div>
		                    </div>
							
							<input type="hidden" name="DataType" value="<?php echo $item->DataType ?>"/>
							<?php if($item->DataType=='html'){ ?>
							<script type="text/javascript">
								addEditorBasic('editor_value_<?php echo $item->Id ?>');
							</script>
							<?php } ?>
						</div>
					</div>
				</div>
			</form>
            <?php
					}
				}
			?>
            
        </div>
        <!-- /content wrapper -->

    </div>
    <!-- /content -->

</div>
<!-- /content container -->
<?php include APPPATH . 'views/cms/inc/02_foot.php'; ?>


